package com.dy.lock.screen.dao.impl;

import org.springframework.stereotype.Repository;

import com.dy.lock.screen.dao.AdvertCollectDao;
import com.dy.lock.screen.pojo.AdvertCollectInfo;

@Repository("advertCollectDao")
public class AdvertCollectDaoImpl extends
		BaseDaoImpl<AdvertCollectInfo, String> implements AdvertCollectDao {

	@Override
	public String getQueryNamespace() {
		return "mybatis.xml.AdvertCollectMapper";
	}

	@Override
	public int deleteByAdAndUser(AdvertCollectInfo collectInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().delete(
				getQueryNamespace() + ".deleteByAdAndUser", collectInfo);
	}

	@Override
	public AdvertCollectInfo queryByAdAndUser(AdvertCollectInfo collectInfo) {
		// TODO Auto-generated method stub
		return this.getSqlSession().selectOne(
				getQueryNamespace() + ".queryByAdAndUser", collectInfo);
	}

}
